import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin,bytecodePlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
  main: {
    plugins: [externalizeDepsPlugin(),bytecodePlugin()],
    build: {
      rollupOptions: {
        output: {
          format: 'es'
        }
      },
    },
    resolve: {
      alias: {
        '@main': resolve('src/main')
      }
    }
  },
  preload: {
    plugins: [externalizeDepsPlugin(),bytecodePlugin()],
    build: {
      rollupOptions: {
        output: {
          format: 'es'
        }
      }
    }
  },
  renderer: {
    resolve: {
      alias: {
        '@renderer': resolve('src/renderer/src')
      }
    },
    plugins: [vue(),bytecodePlugin()]
  }
})
